package cn.sdormitory.classHygiene.vo;

import cn.hutool.core.date.DatePattern;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.Data;
import org.springframework.format.annotation.DateTimeFormat;

import java.util.Date;

/**
 * @className: ClassHygieneVo
 * @author: Alex
 * @date: 2024/12/12
 **/
@Data
@TableName("b_class bc " +
		"left join class_hygiene chy on bc.id = chy.class_id " +
		"left join sys_user su on bc.class_teacher_id = su.id")
public class ClassHygieneVo {
	
	@TableField(value = "bc.id")
	private Long classId;
	
	@TableField(value = "bc.class_name")
	private String className;
	
	@TableField(value = "su.username")
	private String classTeacherName;
	
	@TableField(value = "chy.id")
	private Long classHygieneId;
	
	@TableField(value = "chy.time_slot")
	private String timeSlot;
	
	@TableField(value = "chy.grade")
	private Integer grade;
	
	@TableField(value = "chy.check_date")
	@JsonFormat(pattern = DatePattern.NORM_DATE_PATTERN, timezone = "GMT+8")
	@DateTimeFormat(pattern = DatePattern.NORM_DATE_PATTERN)
	private Date checkDate;
}
